package com.itliupeng.stock.mapper;

import com.itliupeng.stock.pojo.domain.Stock4EvrDayDomain;
import com.itliupeng.stock.pojo.domain.Stock4MinuteDomain;
import com.itliupeng.stock.pojo.domain.Stock4WkdDomain;
import com.itliupeng.stock.pojo.domain.StockUpdownDomain;
import com.itliupeng.stock.pojo.entity.StockRtInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* @author 22375
* @description 针对表【stock_rt_info(个股详情信息表)】的数据库操作Mapper
* @createDate 2025-04-06 20:25:45
* @Entity com.itliupeng.stock.pojo.entity.StockRtInfo
*/
public interface StockRtInfoMapper {

    int insertBatch(@Param("list") List<StockRtInfo> list);

    int deleteByPrimaryKey(Long id);

    int insert(StockRtInfo record);

    int insertSelective(StockRtInfo record);

    StockRtInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockRtInfo record);

    int updateByPrimaryKey(StockRtInfo record);



    List<StockUpdownDomain> getStockInfoByTime(@Param("curDate")Date date);

    List<StockUpdownDomain> getStockMInfoByPage(@Param("curDate")Date date);


    List<Map> getStockUpdownCount(@Param("openTime") Date openTime, @Param("curTime") Date curTime, @Param("flag") int i);

    /*
    * 统计时间点下股票在各个涨跌区间的数量
    * */
    List<Map> getIncreaseRangeInfoByDate(@Param("curDate") Date curDate);

    /**
     * 根据股票编码查询指定时间内的分时数据
     * @param openDate 开盘
     * @param endDate 目前
     * @param stockCode 股票编码
     * @return
     */
    List<Stock4MinuteDomain> getStock4MinuteInfo(@Param("openDate") Date openDate, @Param("endDate") Date endDate, @Param("stockCode") String stockCode);

    List<Stock4EvrDayDomain> getStockInfo4EvrDay(@Param("code") String code, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    List<Date> getStockInfo4EvrDayclose(@Param("code") String code, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    List<Stock4EvrDayDomain> getStockCreenDkLineData(@Param("date") List<Date> date, @Param("code") String code);

    List<Stock4WkdDomain> getWkLinData(@Param("stockCode") String stockCode, @Param("startDate") Date startDate, @Param("endDate") Date endDate);
}
